package synex;

public class BufferSimples implements Buffer {
	
	private int value;
	private static BufferSimples instance = new BufferSimples();
	
	private BufferSimples() {
		value = -1;
	}
	
	public Buffer getInstance() {
		return instance;
	}
	
	public int getBuffer() {		
		System.out.println("Consumidor obtém valor " + value);
		return value;
	}

	public void setBuffer(int value) {
		System.out.println("Produtor produz " + value);
		this.value = value;		
	}
}
